package cn.bdqn.t354.service;

import cn.bdqn.t354.pojo.User;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface UserService {

    /**
     * 登录
     * @param usrName
     * @param usrPassword
     * @return
     */
    public User login(String usrName, String usrPassword);

    /**
     * 新增
     * @param sysUser
     * @return
     */
    public int addUser(User sysUser);

    /**
     * 修改
     * @param sysUser
     * @return
     */
    public int updateUser(User sysUser);

    /**
     * 删除
     * @param id
     * @return
     */
    public int deleteUser(Long id);

    /**
     * 根据id查询用户信息
     * @param id
     * @return
     */
    public User getUser(Long id);

    /**
     * 分页查询
     * @param usrName
     * @param roleId
     * @param pageNo
     * @param pageSize
     * @return
     */
    IPage<User> getUsersByPage(String usrName,Long roleId,
                               Integer pageNo,Integer pageSize);
}
